package com.hm.scala.inf

class UserService extends BaseService with IUserService {

  def addUser(u: User): String = {
    super.initDatabase();

    println("添加用户信息" + u.toString())
    this.outputMsg()

    return u.getId()
  }

  def updateUser(id: String, u: User): Boolean = {
    super.initDatabase();

    println("修改" + id + "用户信息" + u.toString())
    this.outputMsg()
    return true;
  }

  def outputMsg(): Unit = {
    println("完成数据库数据更新")
  }

  override def deleteUser(id: String) {
    super.initDatabase();
    println("删除" + id + "用户信息")
    this.outputMsg()
  }
}